package com.good.cm.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.good.cm.dao.ItemDictMapper;
import com.good.cm.model.ResultInfo;
import com.good.cm.service.ItemDictService;
import com.good.cm.vo.ItemDict;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class DictController {

    @Resource
    private ItemDictService itemDictService;

    //http://localhost:9898/crm/dict/getItemDict?classCode=nursing_duty_name
    @GetMapping("dict/getItemDict")
    @ResponseBody
    public ResultInfo getItemDict(String classCode)
    {
        ResultInfo dictList= itemDictService.getItemDict(classCode);
        return  dictList;
    }

    @GetMapping("dict/getDict")
    @ResponseBody
    public ResultInfo getDict(String name)
    {
        ResultInfo dictList= itemDictService.getDict(name);
        return  dictList;
    }

}
